﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms.ComponentModel.Com2Interop;

namespace 双向绑定2改进再改进
{
    public class Data :BindableBase
    {
        #region 属性单例模式

        private static readonly Lazy<Data> Instance = new Lazy<Data>(() => new Data());

        private Data()
        {
        }

        public static Data Ins { get; } = Instance.Value;

        #endregion 属性单例模式

        private string _string1 = "string1";

        public string String1
        {
            get { return _string1; }
            set { SetProperty(ref _string1, value); }
        }

        private string _string = "string2";

        public string String2
        {
            get { return _string; }
            set { SetProperty(ref _string, value); }
        }

        private int _int1;

        public int Int1
        {
            get { return _int1; }
            set { SetProperty(ref _int1, value); }
        }


  
    }
}
